/* 
	该文件专门用于配置一个一个的路由规则
*/
//引入各个路由组件
import Home from '@/pages/Home'
import Search from '@/pages/Search'

//路由懒加载
// const Home = () => import('@/pages/Home');
const Commodity = () => import('@/pages/Commodity')

import Logon from '@/pages/Logon/Logon'
import Personal from '@/pages/Personal/Personal'
import Address from '@/pages/Address/Address'
const Detail = () => import('../pages/Detail');

const Cart = () => import('../pages/Cart');
const SerchResult = ()=>import('../pages/SerchResult')
export default [
	// {
	// 	name: 'home',
	// 	path: '/home',
	// 	component: Home,
	// },
	{
		name: 'commodity',
		path: '/commodity',
		component: Commodity,
		meta: {
			activeNum: 1,
			isShowTabbar: true,
		},
	},
	// {
	// 	path: '/',
	// 	redirect: '/home',
	// },

	// 登录页面lpp
	{
		name: 'logon',
		path: '/logon',
		component: Logon,
	},
	// 收货地址页面
	{
		name: 'address',
		path: '/address',
		component: Address,
	},
	// 个人中心lpp
	{
		name: 'personal',
		path: '/personal',
		component: Personal,
		meta: {
			activeNum: 3,
			isShowTabbar: true,
		},
	},

	{
		name: 'cart',
		path: '/cart',
		component: Cart,
		meta: {
			activeNum: 2,
			isShowTabbar: true,
		},
	},

	{
		name: 'home',
		path: '/home',
		component: Home,
		meta: {
			activeNum: 0,
			isShowTabbar: true,
		},
	},
	{
		name: 'search',
		path: '/search',
		component: Search,
	},
	{
		name: 'searchresult',
		path: '/searchresult',
		component: SerchResult,
	},
	{
		name: 'detail',
		path: '/detail',
		component: Detail,
	},
	{
		path: '/',
		redirect: '/home',
	},
];
